#
# Config cmake script
#

cmake_minimum_required (VERSION 2.6)
set (PROJECT sign_scanner)

PROJECT(${PROJECT})
Find_package (Qt4 REQUIRED)

# Source directory variable
set (SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set (BOOST_DIR /home/anckaa/projects/sign-scanner/3rd_party/boost_1_52_0)

INCLUDE(${QT_USE_FILE})
ADD_DEFINITIONS(${QT_DEFINITIONS})

include_directories (
                    # project directories
                    ${SOURCE_DIR}
                    ${SOURCE_DIR}/Config
                    ${SOURCE_DIR}/SearchController
                    
                    # Dependencies
	            ${BOOST_DIR}
                    )

set (SOURCES
    ${SOURCE_DIR}/main.cpp
    ${SOURCE_DIR}/MainDialog.cpp
    ${SOURCE_DIR}/DialogInput.cpp
    ${SOURCE_DIR}/ProgressDialog.cpp
    ${SOURCE_DIR}/ServiceConnector.cpp
    ${SOURCE_DIR}/Config/Config.cpp
    ${SOURCE_DIR}/SearchController/SearchController.cpp
    ${SOURCE_DIR}/SearchController/SearchControllerThread.cpp
    ${SOURCE_DIR}/SearchController/SearchTask.cpp
    )
    
set (HEADERS
    ${SOURCE_DIR}/DialogInput.h
    ${SOURCE_DIR}/MainDialog.h
    ${SOURCE_DIR}/ProgressDialog.h
    ${SOURCE_DIR}/SearchController/SearchController.h
    ${SOURCE_DIR}/SearchController/SearchControllerThread.h
    )
    
set (FORMS
    ${SOURCE_DIR}/DialogInput.ui
    ${SOURCE_DIR}/sign_scan_select.ui
    ${SOURCE_DIR}/sign_scan_state.ui
    )

set (RESOURCES
    ${SOURCE_DIR}/resource.qrc
    )
    
QT4_WRAP_CPP(HEADERS_MOC ${HEADERS})
QT4_WRAP_UI(FORMS_HEADERS ${FORMS})
QT4_ADD_RESOURCES(RESOURCES_RCC ${RESOURCES})

add_executable(${PROJECT} ${SOURCES} ${HEADERS_MOC} ${FORMS_HEADERS} ${RESOURCES_RCC})
TARGET_LINK_LIBRARIES(${PROJECT} ${QT_LIBRARIES})

set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/bin)
